'use strict';
/**
 * @fileoverview 统计数据
 * @author agl
 */

var _ = require('lodash');
var mongoose = require('mongoose');

var recordSchema = new mongoose.Schema({
    // 服务器id
    server_id: {
        type: Number,
        required: true,
        index: true
    },

    // 玩家ID
    role_id: {
        type: Number,
        required: true,
        index: true
    },

    // 事件类型
    event_type: {
        type: Number,
        required: true,
        index: true
    },

    // 消耗钻石
    diamond_num: {
        type: String,
        default: '0'
    },

    // 事件时间
    create_time: {
        type: Date,
        index: true,
        default: Date
    }
});

mongoose.model('Record', recordSchema);
